<template>
  <div>
    <div>
      <img src="./assets/d7b07126379007392a565fad5b60c80.jpg" alt="" v-show="flag">
      <button @click="fn">点击显示和隐藏图片</button>
 
      <div v-if="age>=60">60岁以上,打麻将，打太极</div>
      <div v-else-if="age>=30">30岁以上,洗澡按摩</div>
      <div v-else-if="age>=20">20岁以上,琴棋书画</div>
      <div v-else>20岁以下,街溜子</div>
    </div>
  </div>
</template>
 
<script>
export default {
  data() {
    return {
      flag : true,
      age:20
    };
  },
  methods: {
    fn(){
      this.flag = !this.flag
    }
  }
};
</script>

<style scoped>
     
</style>